import request from '@/utils/request'
export function login(username, password) {
  return request({
    url: '/gateway/base/login',
    method: 'post',
    data: { // located in body --post
      username,
      password
    }
  })
}

export function logout() {
  return request({
    url: '/gateway/base/logOut',
    method: 'post'
  })
}

// 忘记密码
// export function checkuser(text) {
//     return request({
//         url: '/gateway/sign/checkUser',
//         method: "post",
//         data: {
//             text
//         }
//     })
// }

// export function getVCode(text) {
//     return request({
//         url: '/gateway/sign/getVerCode',
//         method: 'post',
//         data: {
//             text
//         }
//     })
// }

// export function checkVCode(vertifyForm) {
//     return request({
//         url: '/gateway/sign/checkVerCode',
//         method: 'post',
//         data: vertifyForm
//     })
// }

export function editPassword(id, vercode, pwdForm) {
  return request({
    url: '/gateway/sign/editPassword',
    method: 'put',
    data: {
      'id': id,
      'password': pwdForm.pass,
      'vercode': vercode
    }
  })
}
